home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / BBSPPP10.ZIP / BBSPPP.DOC < prev    next >
Encoding:
Text File  |  1996-03-03  |  10.1 KB  |  266 lines

  1. BBSPPP v1.00 - PPP loader for DOS-based BBS's under OS/2 Warp.
  2. By Chip Morrow - cmorrow@iobbs.netwalk.com
  3. Shareware: $10
  4. My address is:
  5.  
  6.       Chip Morrow
  7.       290 Colony Park Drive
  8.       Pickerington, OH  43147
  9.       email: cmorrow@iobbs.netwalk.com
  10.  
  11. BBSPPP is not crippled in any way.  It will function (or not function,
  12. depending on your viewpoint) identically whether you register it or not.
  13. By registering, you're supporting my efforts, and you'll be notified
  14. (and perhaps even automatically sent) updates as I get them finished.
  15.  
  16. I wrote this program for my own use.  I'm releasing this program as a
  17. feeler to see if anyone else has a similar setup and can use it.  On
  18. the surface it seems like a logical thing for DOS-based BBS sysops to
  19. try, but this is new for me. :)
  20.  
  21. My system is setup as follows:
  22.  
  23.        My provider  Dialup caller
  24.            (7)        (150, default routed to .154)
  25.             |           |
  26.  +-----+--COM1--------COM2
  27.  | OS2 |  (154)       (150 NOT default routed)
  28.  |(154)|
  29.  |     |
  30.  +-----+
  31.  
  32. Some setup info:
  33.  
  34. I have two IP addresses from my service provider.  The first one is
  35. used for my net connection itself, on COM1.  This connection is
  36. on my end xxx.xxx.xxx.154.  This connects to my service provider at
  37. xxx.xxx.xxx.7.  The second is what I let my dialup users into, as
  38. xxx.xxx.xxx.150.  My service provider routes .150 straight to .154
  39. and lets my system deal with whatever comes in destined for .150. 
  40. So the end result is:
  41.  
  42.    .154 -> .7 (my connection to the net, default routed to .7)
  43.    .154 -> .150 (my dialup callers, not default routed)
  44.  
  45. On my service provider's end, they had to route .150 to .154, which
  46. makes my OS/2 go through the gyrations of:
  47.  
  48.   7 -> 154 -> 150  when something comes in for 150, and:
  49.   150 -> 154 -> 7  when something from 150 goes out to the net.
  50.  
  51. I originally used OS/2's "Dial Other Providers" program to make my
  52. connection to the net, which worked fine, but did not redial when the
  53. connection dropped, requiring manual intervention on my part to get
  54. the connection back up when it dropped.  Then, at the advice of a
  55. couple of people in the newsgroups, I located a program named
  56. "PPPFAKE.EXE" on hobbes that took the place of PPP.EXE temporarily.
  57. Last I checked, it had a filename of PPPFK101.ZIP or some such in
  58. the os2/network/tcpip directory.
  59.  
  60. This program set up a .CMD file with the exact paramaters that
  61. "Dial Other Providers" was sending to PPP.EXE.  This let me create
  62. a .CMD file that auto-redialed when the connection dropped, to the
  63. effect of:
  64.  
  65. :GO
  66. ppp [parms]
  67. goto GO
  68.  
  69. At that point, the connection now restarted itself when it dropped,
  70. and it was time to move on to trying to get my BBS dialup to do PPP
  71. connections.
  72.  
  73. To do this, it was basically a matter of mapping out what I needed
  74. to do.  I determined it was like this:
  75.  
  76.    - A DOS fidonet mailer is answering the phone.
  77.    - A BBS caller hooks up.
  78.    - Somewhere between when the DOS mailer "exited to the BBS", and
  79.      the BBS itself loaded, I wanted to direct the caller to either
  80.      a PPP login or the BBS itself.  
  81.  
  82. In that way, PPP users could do a scripted login to a PPP session
  83. right from the standard BBS dialup.
  84.  
  85. That's where this program comes in.
  86.  
  87. BBSPPP is a "shim" between your DOS Fidonet mailer and either your
  88. BBS or a PPP session.
  89.  
  90. BBSPPP is for just about any Fidonet Sysop of a DOS-based BBS under
  91. OS/2 Warp, who has the following special requirements:
  92.  
  93.     - Has a frontend mailer such as Binkley-Term for DOS answering
  94.       the phone.
  95.  
  96.     - Has a dedicated link to the Internet, via a 28.8K PPP, ISDN,
  97.       or whatever else.
  98.  
  99.     - Needs to direct callers after they connect, to either the BBS
  100.       or a PPP session.
  101.  
  102.     - Uses a fossil driver for communications.
  103.  
  104. BBSPPP expects the caller to already be connected when it loads.  It also
  105. requires a fossil driver.  It *CAN* be run in local mode for testing
  106. purposes from your local keyboard, if need be... just don't specify the
  107. node number on the command line.
  108.  
  109. Usage is otherwise:
  110.  
  111.      BBSPPP x
  112.  
  113. Where x is the node number.
  114.  
  115. BBSPPP uses the following text files, that must be configured for your
  116. system:
  117.  
  118.      BBSPPPx.CFG - Node-specific configuration file, or just BBSPPP.CFG
  119.                    if BBSPPPx.CFG doesn't exist.  This is pretty self-
  120.                    explanitory, but has the format of:
  121.  
  122.                    COMx               (COM port of the BBS caller)
  123.                    57600 BAUD,N,8,1   (Port rate and parms you're locked at)
  124.  
  125.      BBSPPP.TXT  - Pre-login screen, after your mailer's display
  126.      BBSPPP.BBS  - Text sent to the caller after they head to the BBS
  127.      BBSPPP.UP   - Text sent to the caller after a successful PPP login,
  128.                    before the PPP connection actually fires up.
  129.      LOGIN.CFG   - The file containing the usernames and passwords that
  130.                    are allowed to do a PPP login.
  131.  
  132. LOGIN.CFG has the following format:
  133.  
  134. 2
  135. user1, password1
  136. user2, thisisuser2'spassword
  137.  
  138. The first line in the file is the number of users configured.
  139. The second and subsequent lines are the usernames and passwords.
  140. The first parameter is the username that will be specified at the
  141. "Login: " prompt, and the second is the password that will be
  142. specified at the "Password: " prompt.  The password entered will
  143. not be echoed back to the user.
  144.  
  145. This leads to the next obvious question... how do you actually start
  146. a PPP session once the caller has logged on successfully and yet
  147. still return control to your mailer when finished?
  148.  
  149. The answer lies in yet another program that I found on hobbes, by
  150. the name of "HSTART".  The filename is/was "hstart03.zip" in the
  151. os2/textutil directory there.  This magical program lets you fire
  152. up an OS/2 program from a DOS session... absolutely required for a
  153. program like this one.
  154.  
  155. Here's the short answer... I run Binkley-Term for DOS, which would
  156. otherwise load my RBBS-PC DOS bulletin board when a BBS caller
  157. connected.  In the section where my BBS would normally load, I now
  158. have these lines in my mailer's batch file:
  159.  
  160. :GETRBBS
  161.         CLS
  162.         vfos_del
  163.         c:                              <--
  164.         cd\bbsppp                       <--
  165.         bbsppp 1                        <--
  166.         if errorlevel 2 goto start      <--
  167.         if errorlevel 1 goto pppstart   <--
  168.         d:
  169.         cd\binkley
  170.         BBSBATCH
  171.         GOTO START
  172.  
  173. Notice the lines marked with "<--".  At this point in my mailer batch
  174. file, my mailer has noticed that a BBS caller has connected.  It then
  175. drops down to this "GETRBBS" line, where it would normally load the
  176. BBS.   But now, it stops and asks the caller whether they want a BBS
  177. or a PPP session, via this BBSPPP program that you're looking at and
  178. evaluating.
  179.  
  180. My mailer batch file changes to the directory where BBSPPP is located,
  181. and runs "bbsppp 1", meaning that it's loading "BBSPPP.EXE", with the
  182. caller coming in on node #1.  BBSPPP then goes through it's motions,
  183. and exits with an errorlevel.  Those errorlevels are *KEY* to doing
  184. the rest, and they are:
  185.  
  186.       Errorlevel 2: Invalid PPP login.  Caller has selected that they
  187.                     want a PPP login, and then has entered an invalid
  188.                     Login/Password combo three times.  BBSPPP drops
  189.                     carrier, waits 10 seconds, and then exits with
  190.                     errorlevel 2.
  191.       Errorlevel 1: Successful PPP login.  Caller has entered a valid
  192.                     login ID and password, and BBSPPP exits with
  193.                     errorlevel 1.
  194.       Errorlevel 0: Caller wants the BBS.  BBSPPP exits with errorlevel 0.
  195.  
  196. In the case of Errorlevel 0, the mailer batch file goes on about it's
  197. business as if nothing ever happened, and loads the BBS.
  198.  
  199. In the case of errorlevel 2, the mailer batch file branches back up and
  200. restarts, just as if the caller had dropped carrier while logging on.
  201.  
  202. But in the case of errorlevel 1, the caller has successfully done a
  203. PPP login.  At this point, the mailer batch file drops down to this
  204. section:
  205.  
  206. :pppstart
  207.         c:
  208.         cd\hstart
  209.         pppstart.bat
  210.  
  211. This changes directories appropriately, and runs this batch file:
  212.  
  213.         hstart /win /wait cd\hstart& pppstart.cmd
  214.         d:
  215.         cd\binkley
  216.         binkley
  217.  
  218. This runs the hstart program (from hobbes) to bring up an OS/2 session
  219. from a DOS session.  Hstart begins the OS/2 session from the root
  220. directory of the drive letter the system boots from, so I have it
  221. change to the "hstart" directory, and then run the OS/2 command
  222. "pppstart.cmd" from there.  
  223.  
  224. /win means I want to start a windowed OS/2 session.
  225. /wait means that this pppstart.bat file will now wait forever for a
  226.       signal from OS/2 to say it's ok to resume.
  227.  
  228. Now here's the PPPSTART.CMD file that this process fires up:
  229.  
  230.         PPP com2 38400 mru 1500 rtscts 205.156.197.154:205.156.197.150 
  231.         netmask 255.255.255.0 modem reneg priority 1 idle 15 exit
  232.         hwait
  233.         exit
  234.  
  235. That first line is the PPP command line that you'll use to start the
  236. PPP session for the remote caller.  It's wrapped here for display
  237. purposes... the second line above beginning with "netmask" is part
  238. of the first line.
  239.  
  240. "hwait" is a program that comes included om "hstart03.zip" from hobbes.
  241. This sends a signal back to the calling DOS session (with the /wait
  242. command line) to say "I'm done now", and let your calling batch file
  243. go on about it's business of reloading your Fidonet mailer as if a
  244. caller had logged off.
  245.  
  246. And really... that's about all there is to it.  
  247.  
  248. Again, programs you'll need from hobbes to accomplish this:
  249.  
  250.     hstart03.zip (start an OS/2 session from a DOS session)
  251.     pppfk101.zip (create a .CMD file from your working "Dial Other
  252.                   Providers" program that you're using with your
  253.                   service provider, to redial your net connection
  254.                   when it drops).  Not essential, but helpful.
  255.  
  256. That's it.
  257.  
  258. Enjoy.
  259.  
  260. Send 10 bucks when it works for you. :)
  261.  
  262.        Chip Morrow
  263.        290 Colony Park Drive
  264.        Pickerington, OH  43147
  265.        cmorrow@iobbs.netwalk.com
  266.